Class symantec.itools.awt.BorderPanel
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.awt.BorderPanel

Object
   |
   +----Component
           |
           +----Container
                   |
                   +----Panel
                           |
                           +----symantec.itools.awt.BorderPanel

public class BorderPanel
extends Panel
implements AlignStyle, BevelStyle, ContainerListener
BorderPanel is a panel component that has an optional border and optional text title.

Version:
1.1, July 19, 1997
Author:
Symantec

Variable Index

 o bevelDarkerColor
The color to use as a hilight when BevelStyle is BEVEL_RAISED or BEVEL_LOWERED.
 o bevelLighterColor
The color to use as a hilight when BevelStyle is BEVEL_RAISED or BEVEL_LOWERED.
 o borderColor
The border color.
 o cachedBackground
Cached value of the background color.
 o errors
Error strings.
 o internalInsets
The internal border insets.
 o ixPad
The side border inset padding amount, in pixels.
 o iyPadBottom
The bottom border inset padding amount, in pixels.
 o iyPadTop
The top border inset padding amount, in pixels.
 o label
The text label to display in the border.
 o labelAlignment
The border label alignment: ALIGN_LEFT, ALIGN_CENTERED, or ALIGN_RIGHT.
 o labelColor
The border label color.
 o labelipadx
Label horizontal coordinate inset constant, in pixels.
 o labelpadx
Label horizontal coordinate padding constant, in pixels.
 o padbottom
The bottom border outside padding amount, in pixels.
 o padleft
The left border outside padding amount, in pixels.
 o padright
The right border outside padding amount, in pixels.
 o padtop
The top border outside padding amount, in pixels.
 o panel
The panel within the border.
 o style
The border style: BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, or BEVEL_NONE.

Constructor Index

 o symantec.itools.awt.BorderPanel()
Constructs a new default BorderPanel.
 o symantec.itools.awt.BorderPanel(int)
Constructs a new BorderPanel with the specified beveled border style.
 o symantec.itools.awt.BorderPanel(String)
Constructs a new BorderPanel with the specified border label.
 o symantec.itools.awt.BorderPanel(String, int)
Constructs a new BorderPanel with the specified border label and given alignment.
 o symantec.itools.awt.BorderPanel(String, int, int)
Constructs a new BorderPanel with the specified border label and given alignment and border styles.

Method Index

 o addBevelStyleListener(PropertyChangeListener)
Adds a listener for Orienation changes.
 o addBevelStyleListener(VetoableChangeListener)
Adds a vetoable listener for BevelStyle changes.
 o addContainerListener(ContainerListener)
 o addImpl(Component, Object, int)
Adds the specified component to this container at the specified index.
 o addNotify()
Tells this component that it has been added to a container.
 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener for all event changes.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a vetoable listener for all event changes.
 o calculateHilightColors(Color)
Used to calculate the hilight colors from the background color.
 o componentAdded(ContainerEvent)
A method of the ContainerListener interface.
 o componentRemoved(ContainerEvent)
A method of the ContainerListener interface.
 o countComponents()
Returns the number of components in this container.
 o draw(Graphics)
Draws the border panel.
 o drawBorder(Graphics, int, int, int, int)
Draws the border panel border.
 o drawLabel(Graphics, FontMetrics)
Draws the border panel label.
 o getAlignStyle()
Gets the current border label alignment.
 o getBevelStyle()
Gets the current border style.
 o getBorderColor()
Gets the current border color.
 o getComponent(int)
Gets the component at the specified zero-relative component index.
 o getComponentCount()
Returns the number of components in this container.
 o getComponents()
Returns all of the components in this container.
 o getIPadBottom()
Gets the current bottom border inset padding amount, in pixels.
 o getIPadSides()
Gets the current side border inset padding amount, in pixels.
 o getIPadTop()
Gets the current top border inset padding amount, in pixels.
 o getInternalInsets()
Gets the current internal border insets.
 o getLabel()
Returns the text label displayed in the border.
 o getLabelColor()
Gets the current border label color.
 o getLabelTopMargin()
Returns the current margin above the label.
 o getLabelWidthMargin()
Returns the current label width margin.
 o getLayout()
Gets the current border panel layout manager.
 o getMinimumSize()
Returns the minimum dimensions to properly display this component.
 o getPaddingBottom()
Gets the current bottom border outside padding amount, in pixels.
 o getPaddingLeft()
Gets the current left border outside padding amount, in pixels.
 o getPaddingRight()
Gets the current right border outside padding amount, in pixels.
 o getPaddingTop()
Gets the current top border outside padding amount, in pixels.
 o getPreferredSize()
Returns the recommended dimensions to properly display this component.
 o insets()
Returns the amount of space used by the current border.
 o isValidBevelStyle(int)
Is the specified bevelStyle valid?
 o layout()
Handles the laying out of components within this component.
 o minimumSize()
 o paint(Graphics)
Paints this component using the given graphics context.
 o preferredSize()
 o remove(int)
Removes the component at the specified index from this container.
 o remove(Component)
 o removeAll()
Removes all the components from this container.
 o removeBevelStyleListener(PropertyChangeListener)
Removes a listener for Orienation changes.
 o removeBevelStyleListener(VetoableChangeListener)
Removes a vetoable listener for BevelStyle changes.
 o removeContainerListener(ContainerListener)
 o removeNotify()
Tells this component that it is being removed from a container.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a listener for all event changes.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a vetoable listener for all event changes.
 o reshape(int, int, int, int)
 o setAlignStyle(int)
Sets the border label alignment.
 o setBackground(Color)
Sets this component's background color.
 o setBevelStyle(int)
Sets the border style.
 o setBorderColor(Color)
Sets the current border color.
 o setBorderColor(Color, boolean)
 o setBounds(int, int, int, int)
Moves and/or resizes this component.
 o setIPadBottom(int)
Sets the bottom border inset padding amount, in pixels.
 o setIPadSides(int)
Sets the side border inset padding amount, in pixels.
 o setIPadTop(int)
Sets the top border inset padding amount, in pixels.
 o setInternalInsets(Insets)
Sets the internal border insets.
 o setLabel(String)
Sets the text label to display in the border.
 o setLabelColor(Color)
Sets the border label color.
 o setLayout(LayoutManager)
Sets the layout manager to be used to layout this container.
 o setPadding(int, int, int, int)
Sets the border padding amounts.
 o setPaddingBottom(int)
Sets the bottom border outside padding amount, in pixels.
 o setPaddingLeft(int)
Sets the left border outside padding amount, in pixels.
 o setPaddingRight(int)
Sets the right border outside padding amount, in pixels.
 o setPaddingTop(int)
Sets the top border outside padding amount, in pixels.
 o sizepanel(boolean)
Sizes the border panel from the padding, inset, and label margin information.
 o update(Graphics)
Handles redrawing of this component on the screen.

Variables

 o bevelDarkerColor
protected java.awt.Color bevelDarkerColor
The color to use as a hilight when BevelStyle is BEVEL_RAISED or BEVEL_LOWERED.

 o bevelLighterColor
protected java.awt.Color bevelLighterColor
The color to use as a hilight when BevelStyle is BEVEL_RAISED or BEVEL_LOWERED.

 o borderColor
protected java.awt.Color borderColor
The border color.

 o cachedBackground
protected java.awt.Color cachedBackground
Cached value of the background color. Used to determine if calculated colors need to be updated.

 o errors
protected transient java.util.ResourceBundle errors
Error strings.

 o internalInsets
protected java.awt.Insets internalInsets
The internal border insets. The left and right fields are used while determining the preferred width of this component.

 o ixPad
protected int ixPad
The side border inset padding amount, in pixels. This is the distance between the drawn border and the usable area within the border. It is used to determine the size of the panel contained within this component's borders.

See Also:
panel
 o iyPadBottom
protected int iyPadBottom
The bottom border inset padding amount, in pixels. This is the distance between the drawn border and the usable area within the border. It is used to determine the size of the panel contained within this component's borders.

See Also:
panel
 o iyPadTop
protected int iyPadTop
The top border inset padding amount, in pixels. This is the distance between the drawn border and the usable area within the border. It is used to determine the size of the panel contained within this component's borders.

See Also:
panel
 o label
protected java.lang.String label
The text label to display in the border.

 o labelAlignment
protected int labelAlignment
The border label alignment: ALIGN_LEFT, ALIGN_CENTERED, or ALIGN_RIGHT.

See Also:
ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT
 o labelColor
protected java.awt.Color labelColor
The border label color.

 o labelipadx
protected static final int labelipadx
Label horizontal coordinate inset constant, in pixels.

 o labelpadx
protected static final int labelpadx
Label horizontal coordinate padding constant, in pixels.

 o padbottom
protected int padbottom
The bottom border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

 o padleft
protected int padleft
The left border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

 o padright
protected int padright
The right border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

 o padtop
protected int padtop
The top border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

 o panel
protected java.awt.Panel panel
The panel within the border. This is the panel that contains the components added to the BorderPanel.

 o style
protected int style
The border style: BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, or BEVEL_NONE.

See Also:
BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE

Constructors

 o BorderPanel
public BorderPanel()
Constructs a new default BorderPanel. Its label will be ALIGN_CENTERED and it will have a BEVEL_LINE style border.

 o BorderPanel
public BorderPanel(int style)
Constructs a new BorderPanel with the specified beveled border style. It will have the ALIGN_CENTERED label alignment style.

Parameters:
style - the desired beveled border style
See Also:
BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE
 o BorderPanel
public BorderPanel(String s)
Constructs a new BorderPanel with the specified border label. Its label will be ALIGN_CENTERED and it will have a BEVEL_LINE style border.

Parameters:
s - the label for the panel's border
 o BorderPanel
public BorderPanel(String s,
                   int alignment)
Constructs a new BorderPanel with the specified border label and given alignment.

Parameters:
s - the label for the panel's border
alignment - the label alignment
See Also:
ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT
 o BorderPanel
public BorderPanel(String s,
                   int alignment,
                   int style)
Constructs a new BorderPanel with the specified border label and given alignment and border styles.

Parameters:
s - the label for the panel's border
alignment - the label alignment
style - the border bevel style
See Also:
ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT, BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE

Methods

 o addBevelStyleListener
public synchronized void addBevelStyleListener(PropertyChangeListener listener)
Adds a listener for Orienation changes.

Parameters:
listener - the listener to add.
See Also:
removeBevelStyleListener
 o addBevelStyleListener
public synchronized void addBevelStyleListener(VetoableChangeListener listener)
Adds a vetoable listener for BevelStyle changes.

Parameters:
listener - the listener to add.
See Also:
removeBevelStyleListener
 o addContainerListener
public synchronized void addContainerListener(ContainerListener l)
Overrides:
addContainerListener in class Container
 o addImpl
protected void addImpl(Component comp,
                       Object constraints,
                       int index)
Adds the specified component to this container at the specified index. Also notifies the layout manager to add the component to the this container's layout using the specified constraints object.

This is the method to override if you want to track every add request to a container. An overriding method should usually include a call to super.addImpl(comp, constraints, index). BorderPanel overrides this method to send all additions to it to\ its internal panel

Parameters:
comp - the component to be added
constraints - an object expressing layout contraints for this component
index - the position in the container's list at which to insert the component. -1 means insert at the end.
Overrides:
addImpl in class Container
See Also:
remove, LayoutManager
 o addNotify
public synchronized void addNotify()
Tells this component that it has been added to a container. This is a standard Java AWT method which gets called by the AWT when this component is added to a container. Typically, it is used to create this component's peer. It has been overridden here to hook-up event listeners, and to resize self after peer created.

Overrides:
addNotify in class Panel
See Also:
removeNotify
 o addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener for all event changes.

Parameters:
listener - the listener to add.
See Also:
removePropertyChangeListener
 o addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
Adds a vetoable listener for all event changes.

Parameters:
listener - the listener to add.
See Also:
removeVetoableChangeListener
 o calculateHilightColors
protected void calculateHilightColors(Color c)
Used to calculate the hilight colors from the background color.

See Also:
paint
 o componentAdded
public void componentAdded(ContainerEvent e)
A method of the ContainerListener interface. This method is called when a component is added to this component's panel.

Parameters:
e - the container event
See Also:
ContainerListener
 o componentRemoved
public void componentRemoved(ContainerEvent e)
A method of the ContainerListener interface. This method is called when a component is removed from this component's panel.

Parameters:
e - the container event
See Also:
ContainerListener
 o countComponents
public int countComponents()
Returns the number of components in this container. This is a standard Java AWT method which gets called to return a count of the components within this container.

Overrides:
countComponents in class Container
 o draw
protected void draw(Graphics g)
Draws the border panel.

Parameters:
g - current graphics object
 o drawBorder
protected void drawBorder(Graphics g,
                          int x,
                          int y,
                          int w,
                          int h)
Draws the border panel border.

Parameters:
g - current graphics object
x - x coordinate of panel object
y - y coordinate of panel object
w - w width of panel object
h - h height of panel object
 o drawLabel
protected void drawLabel(Graphics g,
                         FontMetrics fm)
Draws the border panel label.

Parameters:
g - current graphics object
fm - FontMetrics of border panel label
 o getAlignStyle
public int getAlignStyle()
Gets the current border label alignment.

Returns:
the current border label alignment. One of ALIGN_LEFT, ALIGN_CENTERED, or ALIGN_RIGHT
See Also:
ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT, setAlignStyle
 o getBevelStyle
public int getBevelStyle()
Gets the current border style.

Returns:
current border style. One of BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, or BEVEL_NONE
See Also:
BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE, setBevelStyle
 o getBorderColor
public java.awt.Color getBorderColor()
Gets the current border color.

Returns:
the current border color
See Also:
setBorderColor
 o getComponent
public java.awt.Component getComponent(int i)
Gets the component at the specified zero-relative component index. This is a standard Java AWT method which gets called to return the component at a specific position.

Parameters:
i - the zero-relative index of the component to retrieve
Returns:
the component at the given index
Throws: ArrayIndexOutOfBoundsException
if the given component index does not exist
Overrides:
getComponent in class Container
See Also:
getComponents
 o getComponentCount
public int getComponentCount()
Returns the number of components in this container.

Returns:
the number of components in this container
Overrides:
getComponentCount in class Container
See Also:
getComponent
 o getComponents
public java.awt.Component[] getComponents()
Returns all of the components in this container. This is a standard Java AWT method which gets called to return an array of all of the components in this container.

Returns:
an array of components in this container
Overrides:
getComponents in class Container
See Also:
getComponent
 o getIPadBottom
public int getIPadBottom()
Gets the current bottom border inset padding amount, in pixels. This is the distance between the drawn border and the usable area within the border. It is used to determine the size of the panel contained within this component's borders.

Returns:
bottom border inset padding amount
See Also:
setIPadBottom, panel
 o getIPadSides
public int getIPadSides()
Gets the current side border inset padding amount, in pixels. This is the distance between the drawn border and the usable area within the border. It is used to determine the size of the panel contained within this component's borders.

Returns:
side border inset padding amount
See Also:
setIPadSides, panel
 o getIPadTop
public int getIPadTop()
Gets the current top border inset padding amount, in pixels. This is the distance between the drawn border and the usable area within the border. It is used to determine the size of the panel contained within this component's borders.

Returns:
top border inset padding amount
See Also:
setIPadTop, panel
 o getInternalInsets
public java.awt.Insets getInternalInsets()
Gets the current internal border insets. The left and right fields of the internal insets are used while determining the preferred width of this component.

Returns:
the current internal border insets
See Also:
setInternalInsets
 o getLabel
public java.lang.String getLabel()
Returns the text label displayed in the border.

See Also:
setLabel
 o getLabelColor
public java.awt.Color getLabelColor()
Gets the current border label color.

Returns:
current border label color
 o getLabelTopMargin
protected int getLabelTopMargin()
Returns the current margin above the label.

 o getLabelWidthMargin
protected int getLabelWidthMargin()
Returns the current label width margin.

 o getLayout
public java.awt.LayoutManager getLayout()
Gets the current border panel layout manager.

Returns:
current LayoutManager of border panel
Overrides:
getLayout in class Container
See Also:
setLayout
 o getMinimumSize
public java.awt.Dimension getMinimumSize()
Returns the minimum dimensions to properly display this component. This is a standard Java AWT method which gets called to determine the minimum size of this component.

Overrides:
getMinimumSize in class Container
See Also:
getPreferredSize
 o getPaddingBottom
public int getPaddingBottom()
Gets the current bottom border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

Returns:
the bottom border outside padding amount, in pixels
See Also:
setPaddingBottom
 o getPaddingLeft
public int getPaddingLeft()
Gets the current left border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

Returns:
the left border outside padding amount, in pixels
See Also:
setPaddingLeft
 o getPaddingRight
public int getPaddingRight()
Gets the current right border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

Returns:
the right border outside padding amount, in pixels
See Also:
setPaddingRight
 o getPaddingTop
public int getPaddingTop()
Gets the current top border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

Returns:
the top border outside padding amount, in pixels
See Also:
setPaddingTop
 o getPreferredSize
public java.awt.Dimension getPreferredSize()
Returns the recommended dimensions to properly display this component. This is a standard Java AWT method which gets called to determine the recommended size of this component. The size returned is large enough to display the entire border label and the panel within the border.

Overrides:
getPreferredSize in class Container
See Also:
minimumSize
 o insets
public java.awt.Insets insets()
Returns the amount of space used by the current border. This is a standard Java AWT method which gets called to determine the size of the current border. The returned value is the width of each border side in pixels.

Returns:
the current border insets
Overrides:
insets in class Container
 o isValidBevelStyle
public boolean isValidBevelStyle(int bevelStyle)
Is the specified bevelStyle valid?

Parameters:
bevelStyle - the style to test
Returns:
if true then the parameter was equal to one of the following:
See Also:
BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE
 o layout
public void layout()
Handles the laying out of components within this component. This is a standard Java AWT method which gets called by the AWT when this component is validated with the validate() method.

Overrides:
layout in class Container
See Also:
validate
 o minimumSize
public java.awt.Dimension minimumSize()
Note: minimumSize() is deprecated.

Overrides:
minimumSize in class Container
See Also:
getMinimumSize
 o paint
public void paint(Graphics g)
Paints this component using the given graphics context. This is a standard Java AWT method which typically gets called by the AWT to handle painting this component. It paints this component using the given graphics context. The graphics context clipping region is set to the bounding rectangle of this component and its [0,0] coordinate is this component's top-left corner.

Parameters:
g - the graphics context used for painting
Overrides:
paint in class Container
See Also:
repaint, update
 o preferredSize
public java.awt.Dimension preferredSize()
Note: preferredSize() is deprecated.

Overrides:
preferredSize in class Container
See Also:
getPreferredSize
 o remove
public void remove(int index)
Removes the component at the specified index from this container.

Parameters:
index - the index of the component to be removed
Overrides:
remove in class Container
See Also:
add
 o remove
public void remove(Component comp)
Overrides:
remove in class Container
 o removeAll
public void removeAll()
Removes all the components from this container. This is a standard Java AWT method which gets called to remove all the components from a container. When this happens each component's removeNotify() will also get called to indicate component removal.

Overrides:
removeAll in class Container
See Also:
remove, add
 o removeBevelStyleListener
public synchronized void removeBevelStyleListener(PropertyChangeListener listener)
Removes a listener for Orienation changes.

Parameters:
listener - the listener to remove.
See Also:
addBevelStyleListener
 o removeBevelStyleListener
public synchronized void removeBevelStyleListener(VetoableChangeListener listener)
Removes a vetoable listener for BevelStyle changes.

Parameters:
listener - the listener to remove.
See Also:
addBevelStyleListener
 o removeContainerListener
public synchronized void removeContainerListener(ContainerListener l)
Overrides:
removeContainerListener in class Container
 o removeNotify
public synchronized void removeNotify()
Tells this component that it is being removed from a container. This is a standard Java AWT method which gets called by the AWT when this component is removed from a container. Typically, it is used to destroy the peers of this component and all its subcomponents. It has been overridden here to unhook event listeners.

Overrides:
removeNotify in class Container
See Also:
addNotify
 o removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
Removes a listener for all event changes.

Parameters:
listener - the listener to remove.
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a vetoable listener for all event changes.

Parameters:
listener - the listener to remove.
See Also:
addVetoableChangeListener
 o reshape
public void reshape(int x,
                    int y,
                    int width,
                    int height)
Note: reshape() is deprecated.

Overrides:
reshape in class Component
See Also:
setBounds
 o setAlignStyle
public void setAlignStyle(int newLabelAlignment) throws PropertyVetoException
Sets the border label alignment.

Parameters:
alignment - the new border label alignment. One of ALIGN_LEFT, ALIGN_CENTERED, or ALIGN_RIGHT
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getAlignStyle, ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT
 o setBackground
public void setBackground(Color c)
Sets this component's background color. This is a standard Java AWT method which gets called to change the background color of this component.

Parameters:
c - the new background color
Overrides:
setBackground in class Component
See Also:
getBackground
 o setBevelStyle
public void setBevelStyle(int newBevelStyle) throws PropertyVetoException
Sets the border style.

Parameters:
s - the new border style. One of BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, or BEVEL_NONE
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE, getBevelStyle
 o setBorderColor
public void setBorderColor(Color newBorderColor) throws PropertyVetoException
Sets the current border color.

Parameters:
newBorderColor - the new border color
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getBorderColor
 o setBorderColor
public void setBorderColor(Color clr,
                           boolean useForLabel) throws PropertyVetoException
Note: setBorderColor() is deprecated. As of JDK version 1.1, replaced by setBorderColor & setLabelColor.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setBorderColor(java.awt.Color), setLabelColor(java.awt.Color)
 o setBounds
public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Moves and/or resizes this component. This is a standard Java AWT method which gets called to move and/or resize this component. Components that are in containers with layout managers should not call this method, but rely on the layout manager instead.

Parameters:
x - horizontal position in the parent's coordinate space
y - vertical position in the parent's coordinate space
width - the new width
height - the new height
Overrides:
setBounds in class Component
 o setIPadBottom
public void setIPadBottom(int b) throws PropertyVetoException
Sets the bottom border inset padding amount, in pixels. This is the distance between the drawn border and the usable area within the border. It is used to determine the size of the panel contained within this component's borders.

Parameters:
b - bottom border inset padding amount
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getIPadBottom, panel
 o setIPadSides
public void setIPadSides(int s) throws PropertyVetoException
Sets the side border inset padding amount, in pixels. This is the distance between the drawn border and the usable area within the border. It is used to determine the size of the panel contained within this component's borders.

Parameters:
s - side border inset padding amount
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getIPadSides, panel
 o setIPadTop
public void setIPadTop(int t) throws PropertyVetoException
Sets the top border inset padding amount, in pixels. This is the distance between the drawn border and the usable area within the border. It is used to determine the size of the panel contained within this component's borders.

Parameters:
t - top border inset padding amount
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getIPadTop, panel
 o setInternalInsets
public void setInternalInsets(Insets newInsets) throws PropertyVetoException
Sets the internal border insets. The left and right fields of the internal insets are used while determining the preferred width of this component.

Parameters:
newInsets - the new internal border insets
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getInternalInsets
 o setLabel
public void setLabel(String newLabel) throws PropertyVetoException
Sets the text label to display in the border.

Parameters:
newLabel - the new border label. If null, label is removed
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getLabel
 o setLabelColor
public void setLabelColor(Color newLabelBorderColor) throws PropertyVetoException
Sets the border label color.

Parameters:
newLabelBorderColor - new border label color
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getLabelColor
 o setLayout
public void setLayout(LayoutManager l)
Sets the layout manager to be used to layout this container. This is a standard Java AWT method which gets called to specify which layout manager should be used to layout the components in standard containers.

Parameters:
l - the layout manager to use to layout this container's components
Overrides:
setLayout in class Container
See Also:
getLayout
 o setPadding
public void setPadding(int t,
                       int b,
                       int l,
                       int r) throws PropertyVetoException
Sets the border padding amounts. This are the distances between the drawn border and the actual bounds of the component.

Parameters:
t - the top padding amount
b - the bottom padding amount
l - the left padding amount
r - the right padding amount
Throws: PropertyVetoException
if the specified property value is unacceptable
 o setPaddingBottom
public void setPaddingBottom(int newPadBottom) throws PropertyVetoException
Sets the bottom border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

Parameters:
newPadBottom - the bottom border outside padding amount, in pixels
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getPaddingBottom
 o setPaddingLeft
public void setPaddingLeft(int newPadLeft) throws PropertyVetoException
Sets the left border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

Parameters:
newPadLeft - the left border outside padding amount, in pixels
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getPaddingLeft
 o setPaddingRight
public void setPaddingRight(int newPadRight) throws PropertyVetoException
Sets the right border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

Parameters:
newPadRight - the right border outside padding amount, in pixels
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getPaddingRight
 o setPaddingTop
public void setPaddingTop(int newPadTop) throws PropertyVetoException
Sets the top border outside padding amount, in pixels. This is the distance between the drawn border and the actual bounds of the component.

Parameters:
newPadTop - the top border outside padding amount, in pixels
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
getPaddingTop
 o sizepanel
protected void sizepanel(boolean force)
Sizes the border panel from the padding, inset, and label margin information.

Parameters:
force - force setBounds even if the overall size hasn't changed
 o update
public void update(Graphics g)
Handles redrawing of this component on the screen. This is a standard Java AWT method which gets called by the Java AWT (repaint()) to handle repainting this component on the screen. The graphics context clipping region is set to the bounding rectangle of this component and its [0,0] coordinate is this component's top-left corner. Typically this method paints the background color to clear the component's drawing space, sets graphics context to be the foreground color, and then calls paint() to draw the component.

Parameters:
g - the graphics context
Overrides:
update in class Container
See Also:
repaint, paint

All Packages  Class Hierarchy  This Package  Previous  Next  Index